﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.CommonTables.SC.WJYY
{
    /// <summary>
    /// MaZuiTongYiShuCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class QuanMaSuXingPingFenCtrl : CustomCommonTableCtrl
    {
        public QuanMaSuXingPingFenCtrl()
        {
            InitializeComponent();
            IniteRadioBation();
        }
        private void Date_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {
                rqn.Value = cusDatePicker.SelectedDateTime.Year;
                rqy.Value = cusDatePicker.SelectedDateTime.Month;
                rqr.Value = cusDatePicker.SelectedDateTime.Day;
                rqs.Value = cusDatePicker.SelectedDateTime.TimeOfDay.Hours;
                rqf.Value = cusDatePicker.SelectedDateTime.TimeOfDay.Minutes;

                // rq1.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM_CN);//2005年11月5日
            }
        }
        private void IniteRadioBation()
        {
            new RadioButtonHelper().ChangeRadioSatus(cz,cy); new RadioButtonHelper().ChangeRadioSatus(qgdg_bl, qgdg_f);
            new RadioButtonHelper().ChangeRadioSatus(cfz,cfy); new RadioButtonHelper().ChangeRadioSatus(kytqd_s, kytqd_f);
            new RadioButtonHelper().ChangeRadioSatus(sqz,sqy); new RadioButtonHelper().ChangeRadioSatus(jlo, jl1, jl2, jl3, jl4, jl5);
            new RadioButtonHelper().ChangeRadioSatus(hzetx, hz3,hz4,hz5); 
            new RadioButtonHelper().ChangeRadioSatus(jsz, jsy); 
            new RadioButtonHelper().ChangeRadioSatus(jqz, jqy); 
            new RadioButtonHelper().ChangeRadioSatus(xgmy, xgqj, xgwx); 
            new RadioButtonHelper().ChangeRadioSatus(ccyd_y, ccyd_n); 
            new RadioButtonHelper().ChangeRadioSatus(zgyd_y, zgyd_n); 
            new RadioButtonHelper().ChangeRadioSatus(ysqx, yswx,yshm,yshs,ysmh,ysss); 
            new RadioButtonHelper().ChangeRadioSatus(hxdtc, hxdf); 
        }
    }
}
